const initAddressSingleState={
	fullscreen:false,
	form:{
		username:'',
		mobilenumber:'',
		gender:'0',
		department:'',
		title:'',
		telephone:'',
		email:'',
		cardnumber:'',
		bankname:''
	},
	status:0,
	error:''
}
const initAddressImportState={
	fullscreen:false,
	status:0,
	error:'',
	data:[]
}
export function AddAddressSingle(state=initAddressSingleState,action = null){
	switch(action.type){
		case 'single/submit':
			return Object.assign({},state,{form:action.form});
		default:
			return state;
	}
}
export function AddAddressImport(state=initAddressImportState,action = null){
	switch(action.type){
		case 'import/upload':
			let data=[{username:'王晓明',gender:'1',department:'master',title:'owner',mobilenumber:'123',telephone:'1234565787',email:'12899@134.com',cardnumber:'2334444422',bankname:'兴业银行',status:0,error:''},
			{username:'',gender:'0',department:'develop',title:'clerk',mobilenumber:'1465767',telephone:'28509850',email:'12865464@164.com',cardnumber:'2334444422',bankname:'兴业银行',status:1,error:'用户名不能为空'}
		];
		return Object.assign({},state,{data:data});
		case 'import/submit':
			return state;
		default:
			return state;
	}
}
